﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Talentnet.Data.Access;
using Talentnet.Data.Entity;
using System.Data;
namespace Talentnet.Data.Factory
{
    partial class LoginUserFactory
    {
        public int Login(int clientID, string username, string password, string remoteIP)
        {
            return _dbObj.UserLogin(clientID, username, password, remoteIP);
        }
        public LoginUser GetUserDetail(string username)
        {
            return _dbObj.GetUserDetail(0, username);
        }
        public LoginUser GetUserDetail(Guid userRecID)
        {
            return _dbObj.GetUserDetail(userRecID);
        }
        public DataTable GetUserPermissions(Guid userRecID)
        {
            return _dbObj.GetUserPermissions(userRecID);
        }
        public DataTable GetUserRoles(Guid userRecID)
        {
            return _dbObj.GetUserRoles(userRecID);
        }
        public DataTable GetUserMenus(Guid userRecID)
        {
            return _dbObj.GetUserMenus(userRecID);
        }
        public void CreateForgotPwdRequest(Guid userRecID, string validKey)
        {
            _dbObj.CreateForgotPwdRequest(userRecID, validKey);
        }
        public int ValidateForgotPwdRequest(Guid userRecID, string validKey, string remoteIP)
        {
            return _dbObj.ValidateForgotPwdRequest(userRecID, validKey, remoteIP);
        }
        public int UserChangePwd(Guid userRecID, string curPwd, string newPwd)
        {
            return _dbObj.UserChangePwd(userRecID, curPwd, newPwd);
        }
    }
}
